<template>
  <div style="flex-direction: column;">
    <m-tabbar :tabItems='tabItems'></m-tabbar>
  </div>
</template>

<script>
  var getBaseURL = require('./include/base-url.js').getBaseURL
  export default {
    components:{
      mTabbar: require('./modules/tabbar.vue')
    },
    data: function() {
      return{
        logoUrl: 'http://img1.vued.vanthink.cn/vued08aa73a9ab65dcbd360ec54659ada97c.png',
        target: 'World',
        baseURL:'',
        tabItems: [
          {
            index: 0,
            title: '首页',
            titleColor: '#FF0000',
            icon:'',
            src: 'components/home.js',
            visibility: 'visible',
          },
          {
            index: 1,
            title: '产品',
            titleColor: '#FF0000',
            src: 'components/content.js?s=1',
            visibility: 'hidden',
          },
          {
            index: 2,
            title: '发现',
            titleColor: '#FF0000',
            src: 'components/found.js',
            // src: 'components/beauty.js',
            visibility: 'hidden',
          },
          {
            index: 3,
            title: '我的',
            titleColor: '#FF0000',
            src: 'components/content.js?s=2',
            visibility: 'hidden',
          }
        ],
      }
    },
    created:function(){
      this.baseURL = getBaseURL(this);
      for(var i = 0; i < this.tabItems.length; i++) {
          var tabItem = this.tabItems[i];
          tabItem.src = this.baseURL + tabItem.src;
      }
    }
  }
</script>